<template>
  <div class="tabsContainer">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="商品详情" name="first">
        <v-desc :goodsdesc="goodsdesc" />
      </el-tab-pane>
      <el-tab-pane label="评论" name="second">
        <v-eval />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import evaluateVue from "./evaluate.vue";
import descVue from "./desc.vue";
export default {
  props: {
    goodsdesc: String,
  },
  components: {
    "v-eval": evaluateVue,
    "v-desc": descVue,
  },
  data() {
    return {
      activeName: "first",
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
};
</script>

<style lang="less" scoped>
.tabsContainer {
  padding: 20px;
}
</style>